// const router = require("koa-router")();

const Router = require("koa-router")
const router = new Router();
// console.log(router instanceof Router);//config/index.js  requireDirectory
const MembersModel = require("../../models/Members")
// 查询数据库
router.get("/m1/edit",async ctx=>{
    // ctx.body = "api"
    var {id} = ctx.query;
    var data = await MembersModel.findOne({_id:id});
    // ctx.redirect("m1")
    await ctx.render("edit",{data:data})
})
module.exports = router;